/**
 * Copyright (c) 快宝网络 kuaidihelp.com Co., Ltd. All Rights Reserved 禁止外泄以及用于其它的商业用途
 */

import { Request, Response } from 'express';
import { ResponseItem, responseSuccess } from './utils';
import type { ListItem } from '@/pages/HandleFeedback/types';

export default {
  'POST /courier/feedbackList': (req: Request, res: Response, u: string) => {
    const list: Array<ListItem> = [];
    Array.from({
      length: 5,
    }).map((_, index) => {
      list.push({
        app: 'IOS_8.1.60',
        content: '测试测试测试测试',
        courier_id: '428220',
        create_at: '2021-01-08 18:50:45',
        id: `${index}`,
        images: [
          'https://osscdn-kbad.kuaidihelp.com/admin/ad/2022/05/10/627a58cb25434/1.png',
          'https://osscdn-kbad.kuaidihelp.com/admin/ad/2022/05/10/627a58cb25434/1.png',
          'https://osscdn-kbad.kuaidihelp.com/admin/ad/2022/05/10/627a58cb25434/1.png',
          'https://osscdn-kbad.kuaidihelp.com/admin/ad/2022/05/10/627a58cb25434/1.png',
          'https://osscdn-kbad.kuaidihelp.com/admin/ad/2022/05/10/627a58cb25434/1.png',
          'https://osscdn-kbad.kuaidihelp.com/admin/ad/2022/05/10/627a58cb25434/1.png',
        ],
        phone: '17111111111',
        reply: '回复内容',
        reply_user: '111222',
        status: '0',
        status_desc: '待处理',
        type: '2',
        type_desc: '功能建议',
        update_at: '2021-01-08 18:50:45',
      });
    });

    const result: ResponseItem = {
      code: 0,
      msg: '成功',
      data: {
        list,
        page: '1',
        pageSize: '10',
        total: '5',
      },
    };
    return res.json(result);
  },
  'POST /courier/feedbackDeal': (req: Request, res: Response) => responseSuccess(req, res),
  'POST /courier/feedbackReply': (req: Request, res: Response) => responseSuccess(req, res),
};
